/*
 * @Author:
 * @Date: 2022-11-24 13:56:00
 * @LastEditors:
 * @LastEditTime: 2023-06-15 16:39:05
 * @FilePath: \immoka-admin\src\api\roomGift\giftClassification.js
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name} , All Rights Reserved.
 */
import request from "@/utils/request";

//获取所有礼物分类
export function getListApi() {
  return request({
    url: "/gift/category/sub-categories",
    method: "get"
  });
}
//删除
//ids	Int|string	要删除的记录id，多个用英文逗号连接，必须
export function delGiftList(data) {
  return request({
    url: "/gift/category",
    method: "delete",
    data
  });
}
//新增

// parent_category_id	Int	父分类id，必须
// category_name	String	分类名称，必须
// gift_desc_bg_id	Int	礼物说明背景id，必须
// sort	Int	排序号，必须
// status	String	状态：1：启用；2：禁用，必须

export function addGiftList(data) {
  return request({
    url: "/gift/category",
    method: "post",
    data
  });
}
//编辑
// id	Int	要编辑的记录id，必须
// parent_category_id	Int	父分类id，必须
// category_name	String	分类名称，必须
// gift_desc_bg_id	Int	礼物说明背景id，必须
// sort	Int	排序号，必须
// status	String	状态：1：启用；2：禁用，必须

export function editGiftList(data) {
  return request({
    url: "/gift/category",
    method: "put",
    data
  });
}

//获取所有礼物说明背景
export function giftAllBg() {
  return request({
    url: "/gift/desc-bg/all",
    method: "get"
  });
}

// 展示分类查询
export function categoryExtra() {
  return request({
    url: "/gift/category/extra",
    method: "get"
  });
}
